// (todo:gen2.template) 
// 这个配置文件是由 starter-configen 工具自动生成的。
// 任何时候，都不要手工修改这里面的内容！！！

package cfggogit

import (
	commands0x504efa "bitwormhole.com/djaf/go-git-starter/libgogit/commands"
	application "github.com/bitwormhole/starter/application"
	config "github.com/bitwormhole/starter/application/config"
	lang "github.com/bitwormhole/starter/lang"
	util "github.com/bitwormhole/starter/util"
    
)


func nop(x ... interface{}){
	util.Int64ToTime(0)
	lang.CreateReleasePool()
}


func autoGenConfig(cb application.ConfigBuilder) error {

	var err error = nil
	cominfobuilder := config.ComInfo()
	nop(err,cominfobuilder)

	// component: com0-commands0x504efa.GitAdd
	cominfobuilder.Next()
	cominfobuilder.ID("com0-commands0x504efa.GitAdd").Class("cli-handler-registry").Aliases("").Scope("")
	cominfobuilder.Factory((&comFactory4pComGitAdd{}).init())
	err = cominfobuilder.CreateTo(cb)
	if err != nil {
		return err
	}

	// component: com1-commands0x504efa.GitCommit
	cominfobuilder.Next()
	cominfobuilder.ID("com1-commands0x504efa.GitCommit").Class("cli-handler-registry").Aliases("").Scope("")
	cominfobuilder.Factory((&comFactory4pComGitCommit{}).init())
	err = cominfobuilder.CreateTo(cb)
	if err != nil {
		return err
	}

	// component: com2-commands0x504efa.GitExample
	cominfobuilder.Next()
	cominfobuilder.ID("com2-commands0x504efa.GitExample").Class("cli-handler-registry").Aliases("").Scope("")
	cominfobuilder.Factory((&comFactory4pComGitExample{}).init())
	err = cominfobuilder.CreateTo(cb)
	if err != nil {
		return err
	}



    return nil
}

////////////////////////////////////////////////////////////////////////////////

// comFactory4pComGitAdd : the factory of component: com0-commands0x504efa.GitAdd
type comFactory4pComGitAdd struct {

    mPrototype * commands0x504efa.GitAdd

	

}

func (inst * comFactory4pComGitAdd) init() application.ComponentFactory {

	


	inst.mPrototype = inst.newObject()
    return inst
}

func (inst * comFactory4pComGitAdd) newObject() * commands0x504efa.GitAdd {
	return & commands0x504efa.GitAdd {}
}

func (inst * comFactory4pComGitAdd) castObject(instance application.ComponentInstance) * commands0x504efa.GitAdd {
	return instance.Get().(*commands0x504efa.GitAdd)
}

func (inst * comFactory4pComGitAdd) GetPrototype() lang.Object {
	return inst.mPrototype
}

func (inst * comFactory4pComGitAdd) NewInstance() application.ComponentInstance {
	return config.SimpleInstance(inst, inst.newObject())
}

func (inst * comFactory4pComGitAdd) AfterService() application.ComponentAfterService {
	return inst
}

func (inst * comFactory4pComGitAdd) Init(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitAdd) Destroy(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitAdd) Inject(instance application.ComponentInstance, context application.InstanceContext) error {
	return nil
}



////////////////////////////////////////////////////////////////////////////////

// comFactory4pComGitCommit : the factory of component: com1-commands0x504efa.GitCommit
type comFactory4pComGitCommit struct {

    mPrototype * commands0x504efa.GitCommit

	

}

func (inst * comFactory4pComGitCommit) init() application.ComponentFactory {

	


	inst.mPrototype = inst.newObject()
    return inst
}

func (inst * comFactory4pComGitCommit) newObject() * commands0x504efa.GitCommit {
	return & commands0x504efa.GitCommit {}
}

func (inst * comFactory4pComGitCommit) castObject(instance application.ComponentInstance) * commands0x504efa.GitCommit {
	return instance.Get().(*commands0x504efa.GitCommit)
}

func (inst * comFactory4pComGitCommit) GetPrototype() lang.Object {
	return inst.mPrototype
}

func (inst * comFactory4pComGitCommit) NewInstance() application.ComponentInstance {
	return config.SimpleInstance(inst, inst.newObject())
}

func (inst * comFactory4pComGitCommit) AfterService() application.ComponentAfterService {
	return inst
}

func (inst * comFactory4pComGitCommit) Init(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitCommit) Destroy(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitCommit) Inject(instance application.ComponentInstance, context application.InstanceContext) error {
	return nil
}



////////////////////////////////////////////////////////////////////////////////

// comFactory4pComGitExample : the factory of component: com2-commands0x504efa.GitExample
type comFactory4pComGitExample struct {

    mPrototype * commands0x504efa.GitExample

	

}

func (inst * comFactory4pComGitExample) init() application.ComponentFactory {

	


	inst.mPrototype = inst.newObject()
    return inst
}

func (inst * comFactory4pComGitExample) newObject() * commands0x504efa.GitExample {
	return & commands0x504efa.GitExample {}
}

func (inst * comFactory4pComGitExample) castObject(instance application.ComponentInstance) * commands0x504efa.GitExample {
	return instance.Get().(*commands0x504efa.GitExample)
}

func (inst * comFactory4pComGitExample) GetPrototype() lang.Object {
	return inst.mPrototype
}

func (inst * comFactory4pComGitExample) NewInstance() application.ComponentInstance {
	return config.SimpleInstance(inst, inst.newObject())
}

func (inst * comFactory4pComGitExample) AfterService() application.ComponentAfterService {
	return inst
}

func (inst * comFactory4pComGitExample) Init(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitExample) Destroy(instance application.ComponentInstance) error {
	return nil
}

func (inst * comFactory4pComGitExample) Inject(instance application.ComponentInstance, context application.InstanceContext) error {
	return nil
}




